package com.platform.study;


import com.platform.study.user.UserDao;
import com.platform.study.user.UserModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.zip.ZipEntry;

@SpringBootApplication
@RestController
public class Application {
    @Autowired
    private UserDao userDao;

    @RequestMapping("/")
    public List<UserModel> index() {
        return userDao.findAll();
    }

    public static void main(String[] args) {
        ZipEntry entry ;
        SpringApplication.run(Application.class, args);
    }
}